<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/customerinfo/q_client/q_client.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/customerinfo/q_client/q_client.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Client_id',
                footer: "Foots",
                cnName: '客户信息',
                name: 'q_client/q_client',
                url: "/q_client/",
                sortName: "Client_no"
            });
            const editFormFields = ref({"Client_no":"","Client_name":"","Client_type":"","Client_flag":"","Scale":"","Display_flag":"","Credit_amt":"","Credit_quota":"","Character":"","Client_man":"","Position":"","Client_tel":"","Province":"","City":"","District":"","Client_addr":"","Zip":"","Client_email":"","Client_acct_back":"","Client_acct_no":"","Client_fax":"","Client_tax_no":"","Remark":"","khfzr":"","Image":""});
            const editFormOptions = ref([[{"title":"客户编号","required":true,"field":"Client_no","disabled":true},
                               {"title":"客户名称","required":true,"field":"Client_name"},
                               {"dataKey":"客户标志","data":[],"title":"客户标志","field":"Client_flag","type":"select"},
                               {"dataKey":"客户类型","data":[],"title":"客户类型","required":true,"field":"Client_type","type":"select"}],
                              [{"dataKey":"客户规模","data":[],"title":"客户规模","required":true,"field":"Scale","type":"select"},
                               {"dataKey":"信用等级","data":[],"title":"信用等级","required":true,"field":"Credit_amt","type":"select"},
                               {"dataKey":"信誉额度","data":[],"title":"信誉额度","required":true,"field":"Credit_quota","type":"number"},
                               {"dataKey":"往来标志","data":[],"title":"往来标志","required":true,"field":"Display_flag","type":"select"}],
                              [{"title":"联系人","field":"Client_man"},
                               {"title":"联系人职位","field":"Position","type":"text"},
                               {"title":"电话","field":"Client_tel","type":"text"},
                               {"dataKey":"客户性质","data":[],"title":"客户性质","field":"Character","type":"select"}],
                              [{"dataKey":"省","data":[],"title":"省","field":"Province","type":"select"},
                               {"dataKey":"省","data":[],"title":"市","field":"City","type":"select"},
                               {"dataKey":"省","data":[],"title":"区","field":"District","type":"select"},
                               {"title":"地址","field":"Client_addr"}],
                              [{"title":"银行账户","field":"Client_acct_no"},
                               {"title":"开户银行","field":"Client_acct_back"},
                               {"title":"邮件地址","field":"Client_email"},
                               {"title":"邮编","field":"Zip"}],
                              [{"title":"税务登记号","field":"Client_tax_no","type":"text"},
                               {"title":"传真","field":"Client_fax","type":"text"},
                               {"dataKey":"用户","data":[],"title":"客户负责人","field":"khfzr","type":"select"},
                               {"title":"备注","field":"Remark","type":"textarea"}],
                              [{"title":"图片","field":"Image","type":"img"}]]);
            const searchFormFields = ref({"Client_no":"","Client_name":"","Client_type":"","Client_flag":""});
            const searchFormOptions = ref([[{"title":"客户编号","field":"Client_no","type":"like"},{"title":"客户名称","field":"Client_name","type":"like"},{"dataKey":"客户类型","data":[],"title":"客户类型","field":"Client_type","type":"select"},{"dataKey":"客户标志","data":[],"title":"客户标志","field":"Client_flag","type":"select"}]]);
            const columns = ref([{field:'Client_id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Client_no',title:'客户编号',type:'string',width:120,readonly:true,require:true,align:'left',sort:true},
                       {field:'Client_name',title:'客户名称',type:'string',link:true,width:220,require:true,align:'left'},
                       {field:'Client_type',title:'客户类型',type:'int',bind:{ key:'客户类型',data:[]},width:110,require:true,align:'left'},
                       {field:'Client_flag',title:'客户标志',type:'string',bind:{ key:'客户标志',data:[]},width:110,align:'left'},
                       {field:'Scale',title:'客户规模',type:'int',bind:{ key:'客户规模',data:[]},width:80,require:true,align:'left'},
                       {field:'Character',title:'客户性质',type:'int',bind:{ key:'客户性质',data:[]},width:80,align:'left'},
                       {field:'Region_no',title:'所属地区',type:'string',bind:{ key:'city',data:[]},width:120,hidden:true,align:'left'},
                       {field:'Client_man',title:'联系人',type:'string',width:110,align:'left'},
                       {field:'Position',title:'联系人职位',type:'string',width:110,align:'left'},
                       {field:'Province',title:'省',type:'string',bind:{ key:'省',data:[]},width:120,align:'left'},
                       {field:'City',title:'市',type:'string',bind:{ key:'省',data:[]},width:120,align:'left'},
                       {field:'District',title:'区',type:'string',bind:{ key:'省',data:[]},width:120,align:'left'},
                       {field:'Client_addr',title:'地址',type:'string',width:200,align:'left'},
                       {field:'Zip',title:'邮编',type:'string',width:120,align:'left'},
                       {field:'Client_email',title:'邮件地址',type:'string',width:200,align:'left'},
                       {field:'Client_tel',title:'电话',type:'string',width:110,align:'left'},
                       {field:'Client_fax',title:'传真',type:'string',width:110,align:'left'},
                       {field:'Client_acct_back',title:'开户银行',type:'string',width:200,align:'left'},
                       {field:'Client_acct_no',title:'银行账户',type:'string',width:110,align:'left'},
                       {field:'Client_tax_no',title:'税务登记号',type:'string',width:120,align:'left'},
                       {field:'Display_flag',title:'往来标志',type:'int',bind:{ key:'往来标志',data:[]},width:110,require:true,align:'left'},
                       {field:'Credit_amt',title:'信用等级',type:'int',bind:{ key:'信用等级',data:[]},width:110,require:true,align:'left'},
                       {field:'Credit_quota',title:'信誉额度',type:'decimal',bind:{ key:'信誉额度',data:[]},width:110,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifyer',title:'修改人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Image',title:'图片',type:'img',width:110,align:'left'},
                       {field:'khfzr',title:'客户负责人',type:'int',bind:{ key:'用户',data:[]},width:100,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
